package com.hitqz.robot.camera.entity;

import com.sun.jna.Memory;
import com.sun.jna.Pointer;
import lombok.*;

@Data
public class HkCameraDriver extends CameraDriver {
    private int userId; //登录id
    private int channelNum; //通道数
    private int startChannel; //起始通道号
    private boolean isSupportThermometry; //是否支持测温
    private int thermometryMode; //测温模式
    private Integer stopThermometryHandle; //测温id
    private Integer realPlayId; //预览id
    private Integer voicePlayId; //语音转发id
    private String videoName; //由于录像是两个接口，所以需要保存名称
    private Integer AlarmId;//布警id
    @Setter(AccessLevel.NONE)
    private Pointer pUserData; //ip指针 用于回调函数
    private boolean isSupportPosition3D;

    public HkCameraDriver(String ip, int port, String userName, String password, int userId, int channelNum, int startChannel) {
        this.ip = ip;
        this.port = port;
        this.userName = userName;
        this.password = password;
        this.userId = userId;
        this.channelNum = channelNum;
        this.startChannel = startChannel;
        this.pUserData = new Memory(ip.length() + 1); // WARNING: assumes ascii-only string
        this.pUserData.setString(0, ip);
    }

}
